cleaned and enhanced several algorithms. Added unit tests for pattern_count and most_frequent patterns