Cleaned up processTool. Added javadoc.