Some refactoring on Table/Grid selection abstraction