Update main.py to use the newer refactoring objects. Delete the old stuff in refactor.py.