Split api into routes