Amending dug.js source