[BenweiZhu] rename method and modify some logic for pq qr
[BenweiZhu] reformat piParents.js file and remove some unused variable.