WIP, refactoring templates.