Refactor API code