remove unused code and template