Roi modularized

This is my proposal for modularization.
Notice that in Main.py I have added a main loop because that will allow us to pass arguments down the line.
Look over everything and make sure it all still runs.
If you think it's good, then go ahead and merge it to the ROI branch.