Fix up a bunch of things