template cleanups