Adding template.cpp to src