Refactoring for api documentation