Changed templates to .cpp file