Slimmed down script
Globals work, but are bad. We should be using proper calls.
Cleanup