Cleanup and prepare for koa