removes util._extend which is undocumented

also clean up and remove console.logs and extra variables