minor refactor to extract listbox and previewbox with the goal of eventually writing specialized classes for them.