Get rid of UI formatting, introduce LineSpec

The display of results should go to a different script.