remove pathAry global js variable handling