Removed unneeded double checks and unneeded variables in the mass_action function

Commented out logging of each sql query in the transaction (performance)

This changed will increase the speed the transaction is executed, especially on system that have a low IO performance (removed logging which would be written to disk)