Cleans up templates by adding extends