Moving more functionality over to classes