Fixing pre-process and adding more documentation.