run.py refactor

Moved the argparse stuff to a method, added a main, everything else should be pretty much the same