fixed a bunch of legacy namespace issues