Refactor API version