Templates: Removing unnecessary code