Did a bunch of work on writing to the master file and changed how avgs are stored