Added ability to select cells and fixed bugs.
Fixed a minor bug in cell selection