Backing out some executor changes from previous commit

Fixes problems created with commit d53e1586598948344dc76293fd08a6530c960d80, which involved refactoring executor.js.