Namespace fixes and syntax fixes