Make code more PEP 8 compliant
Move command line arguments into variables for clarity
Generally improve formatting of code