Changed default for cachesize (64M)
Fixed scoping issues with the templates