Bug fix for pattern_hash
Bug fix for getopt
Fixes to printing