move closure-base route functions to task controller