I've implemented the changes I set out in the above post, plus some more! I'm close to calling this finished :)
The file in the dropbox link above has been updated to the newer version.