Added comments to extend.js