Fixed up a bunch of broken stuff.