Criteria correctly calculated

Pulled out the criteria calculation function to a new file.  Calcs are now
returning values for all samples they should be (calculations for each
parameter still need to be verified).  Awesome new graphing added.