Setting up namespace and switching context