Fix all the type annotations to hopefully match up with declarations.