(refact) templates: Delete deprecated files; clean up source code