Cleans up templates slightly