Wrote model classes