Minor template refactors

Porting over minor changes from https://github.com/railsbridge/bridge_troll/pull/152