Fix compile bugs
Add -v option to command line tool
Fix compiler bugs