Fix bug in verfier and add sample
Add some inline documentation