refactoring namespace and fix controllers