restructure api controllers