Finish API refactor