Sync with SVN 5653
Slighly improve verification
Add primitive test and bench