Major modification made to the PL resolver, still haven't debugged yet