Move term selector widget into a directive and a bit of futzing with generic view