Refactoring of PBCtoSAT class