Refactoring: different module stucture for module 'api'