Finally adding actual PATTERN OUTPUT and pattern modification control. Not sure how to manage ties. Maybe another mode is needed.