Fix a bug
Add pile_check_integrity() to ensure lists make sense