Api files refactoring