Change objects to classes for use with a lazy val