Reorganize API

Move API to app/ to improve from autoloading and refreshing. Also it is better suited to be there.