Cleanup, adapting prolog to mercury style.