Tidy up transaction limit code