Cloud of things (CoT)" is a concept that provides smart things' functions as a service and allows them to be used by multiple applications. In the CoT, a single smart thing instance should efficiently host multiple applications, called multi-tenancy. Therefore, simultaneous accesses to shared smart things may lead to resource conflicts. Moreover, smart things inherently form complex dependencies on real-world. Since handling resource conflicts with complex dependencies at an application level is typically ad-hoc and error-prone, it increases the application development burden. To address these issues, we propose a middleware for Evolvable ClOut of things #ECO#. The ECO middleware manages organizations to handle dependency among/between smart things and virtualizes physical smart things to enable isolation between/among multiple applications yet internally controls smart things' sharing to resolve resource conflicts and provides a consolidation framework for efficient utilization of the shared smart things. A lease-based sharing control is employed with two tenant switch schemes which are analyzed. All these features are hidden from application context, thus reducing complexities in developing applications. From implementation and evaluations with workload applications, we show that the ECO middleware provides efficient sharing controls and access controls with negligible virtualization overhead.