Got templates under control now, time to refactor