Started work on conversion to classes