Removing unneeded templates