More tests, support for model references in validation, better model definitions.