Updated ESDF to use the new upstream version of when.js (3.2). Some code refactoring was necessary to accomodate for the change.