Uncommented code for selecting grid or list