Finished refactoring core templates