Cleaned up code.
Updated README with info about pattern-matching sections.