Updates to deter.js to allow for promise chaining.