updates to support validating models passed into controlers, added additional unit tests.