Beginning of conversion to classes