Various namespace fixes