Make state class functions into object.