Completely revamp transaction system; fix classrecord update bug