Fix a bunch of stuff to make build pass