fixed namespace errors
pep8 fixes
pep8 and namespace fixes