fix #687 issues with use strict

There were problems in all of the context menu commands related to "use strict". Running jshints regularly would also catch a lot of these.