Moved functions into class object