Added assertions to test. Added verbose flag.