Adding getopt
Added pattern generator
Calculating pattern hash