I really didn't change anything here apart from a few slight cosmetic fixes and maybe a line of real
code, but i'm going to commit it anyway. Getting ready for the big merge.