Fix even more types, add some imports