Reorganize API structure