Fix a bunch of minor stuff