namespace fixes and small errors