Major changes to the structure of the code, with many nice classes in the middle of it all.