Improve "expected" error messages
Clean up namespaces