Clean up main and make it work almost like python -m pdb