factored the script out into its own, er, script.
Refactored it into a few useful objects. Not useful enough though, it would seem.