implemented commit_trans. Still need to implement writing to log and generating trans number