cleaned up templates unused code