Major graphing changes

Separates results processing into database into a separate script from the graphing script.  Also more writing.