Lots of changes

I'll write out some of the highlights here once I get a chance.