Greatly reduced the code, changed to argparse, now PEP8 compliant
fixed a minor bug in replace
Merge pull request #1 from mllobet/master

Greatly reduced the code, changed to argparse, now PEP8 compliant