Fixed bookkeeping bug!!! Also, added a data collecting class