Improve text formatter; add parser tests [#25]