Change selection model to be more general (handle objects instead of
tables). Fixed bugs like adding selection events to the internal
workspace.