Added model validations and integration tests