fix some namespace issues and such