Made code refactoring for the namespace mapping