WIP: Refactor selections and current line logic; add toolbar.