Fixed a bunch of stuff

Added new columns from the database, changed the way single value
parameters were averaged, and made sure that no null data gets used.