extended the state machine to support headings á la markdown, only h1 and h2. The machine already is becoming pretty large. Too large to write by hand