Minor fixes, got a switch working
Pulling in dino's logging and debug additions

* jpm/rewrite:
  Adding debugger statements in elements
Fix toolbuttons debug logging