added toModel and toDOM methods

updated documentation