Very large rewrite. Changes the way that averages are made so they indicate the average over the last check period, rather than then average over the uptime of the database.