Api tick and refactor