Cleaned up code.
Added post-processing (conflict checking, etc.) to gradES.