Move utility methods and API functions to separate classes.