Clean up toolkit code, restore old code that worked better.
Clean up toolkit code, restore old code that worked better.

Change-Id: Id33564e88afac4a331296e4af4af48b769e6120a

ewpatton/appinventor-sources,josmas/app-inventor,halatmit/appinventor-sources,jisqyv/appinventor-sources,puravidaapps/appinventor-sources,josmas/app-inventor,kkashi01/appinventor-sources,jisqyv/appinventor-sources,mit-cml/appinventor-sources,marksherman/appinventor-sources,ewpatton/appinventor-sources,halatmit/appinventor-sources,barreeeiroo/appinventor-sources,jisqyv/appinventor-sources,puravidaapps/appinventor-sources,josmas/app-inventor,kkashi01/appinventor-sources,mit-dig/punya,marksherman/appinventor-sources,marksherman/appinventor-sources,puravidaapps/appinventor-sources,mit-cml/appinventor-sources,marksherman/appinventor-sources,halatmit/appinventor-sources,jisqyv/appinventor-sources,ewpatton/appinventor-sources,josmas/app-inventor,jisqyv/appinventor-sources,barreeeiroo/appinventor-sources,jisqyv/appinventor-sources,mit-cml/appinventor-sources,kkashi01/appinventor-sources,halatmit/appinventor-sources,mit-dig/punya,halatmit/appinventor-sources,mit-cml/appinventor-sources,marksherman/appinventor-sources,puravidaapps/appinventor-sources,mit-cml/appinventor-sources,ewpatton/appinventor-sources,barreeeiroo/appinventor-sources,mit-dig/punya,mit-cml/appinventor-sources,kkashi01/appinventor-sources,mit-dig/punya,mit-dig/punya,kkashi01/appinventor-sources,barreeeiroo/appinventor-sources,ewpatton/appinventor-sources,kkashi01/appinventor-sources,ewpatton/appinventor-sources,puravidaapps/appinventor-sources,mit-dig/punya,barreeeiroo/appinventor-sources,marksherman/appinventor-sources,halatmit/appinventor-sources,josmas/app-inventor,mit-dig/punya,josmas/app-inventor