Implement more of the rules for filtering out foreign elements before validating.
Add many more tests.