Separated out some converter functions into another  class.