fixed namespace and removed dead code