Adding def.js and redefining structure