Initial empty commit
Copy solution from reddit for a close key
Separate matched vs unmatched pairs

Reduce the duplication of matches.
Broken attempt to close empty strings at end of line