added interfaces.

added realization for model methods

added inner exceptions