removed unused codes and comments
user defined patterns by files
modified variable names
custom patterns by argument
added tests