Rewritten several old-style validators to new ones
Update reference implementation file with more examples