Split shell initialization logic out of ctor