Merge of new validator with tests

Per @gvwilson request (issue #34).
What is .idea ?