Refactor Tools for SWI-Prolog