refactor all the model classes