Remove some code from templates