Full rewrite using koajs. API works now.