Refactoring complete

Fully refactored the script such that one only has to input the
parameters in "script.py" and then run the full script later.