Special case when the block has 0 or 1 patterns left
Fix bug in pushing patterns
remove debug dumping
remove commented-out code