Style cleanup
Move template configuration back into index
Enable template cache in production
Remove bad export
Simplify template init
Add braces on ambiguious constructors