Improvements in extend.js