Refactoring namespace and fix mistake in function name