Refactoring routing for koa.