Closes two issues and adds foundation for caching of views