Refactor API to stop extending Array