Refactors API.