Yeah, I really don't like the look of this code.  If there wasn't value in keeping it as close as possible to google blockly, I would love to clean it up.