Lots of namespace fixes.