Move all templates to one file. Add support for template arguments.