Lots of changes, PEP8 compliance, main + argparse.