refactored API files to make more sense