moved template controller to its own file due to possible upcoming merge
conflicts