Removing unnecessary comments
Writing out prolog facts to constraints.pl file
Adding the necessary dot (.) at the end of each prolog fact
Adding code to emit statistics about RPL variables and constraints which is saved in a file called constraint-stats.txt