Refactored contexts for validation, added unit tests, enabled -plit for ...

...map.