Refactor possibilityList.js to be a list of utility functions