added Functions to Extend class; sorted extend.js to keep it clean