Moved documentation.
Refactored model validation.
Added Error handling.
Added tests for validation.