Refactoring to use the WOPR