Dev

Merging the template caching and subfolder handling into the master branch.