Some minor markup fixes.  Added a global State variable to expose non-sensitive state info to client - including current device state (on, off, connected, whatver), value (object of stock info, object of light switches, whatever), last time updated, keymap, input types and markup templates.