Clean up base template