Code clean-up and better double-clicking

Code clean-up and integrated support for double-clicking grid squares.
Updated the demo site and README.