Clears up transactions logic.