Refactor more. Simplify control flow.  Modularize
Refactor text element processing into appropriate class
Refactor in_line() test and cache font size for text elements
Refactor to get rid of more shared global state
Fix multiline block merging bug introduced by switch to enum
Remove obsolete members
Add TODOs.  Remove debug output