Added comments to stack.js file