General refactoring

In Progress.

- Move general utility functions into ClefUtils
- use render_template instead of include where possible