Revert "Moved some functionality to duggasys.js"

This reverts commit 3fd1b89bf17f86151587fd3c752fa53399ef68fb.