Implementing selection on cells and buttons