Fix: minor tuple creation bug in serveral methods;
Fix: a minor bug in handling command line arguments;
Fix: a few other minor bugs.