Template refactoring

- moved templates to root directory
- renamed and removed a few files
- improved code readability in a few cases
- changed structure a bit (who includes, extends what)