WIP split some routes into api routes