Move util methods into classes.