Changed directory structure, added template caching.