Fix a bunch of custom types, and more