misc template cleanups and docs