Major rewrite of the Arduino sketch.  Commands are now mapped to handler functions using STL maps