Added Entity garbage collection, and view and controller support