Turned functions into classes.