Various changes.

- Templates compilation can be configured.
- Main layout is cleaner and more commented.