Fix and update namespaces, types, etc.