Added an interactive mode for setting/resetting cells.

Also made some code changes/improvements, switched to values
instead of variables in many places.