fixed a bunch of compile errors
Fixed incorrect namespace issues