Added model class, encoded the first part of the form.