Refactor template executable naming and lookup.