Added solution pruning based on prefix and suffix counts.
Removing old prefix/suffix counting since it's not useful anymore.