Improved namespace handling.