Remove dead code from templates package, run fmt.sh