Clean up pending transaction code