Adds TransactionCountThresholdTest and cleans up a bit, including a compile error