Revert "fixed formatting. removed Node-centric code."

This reverts commit 5774d95b34cb4d4c6535025760ca405508fb7ad6.
Revert "updating with the lastest from usergrid-javascript-sdk"

This reverts commit 014531eba18569ef59d75f3412d0f3292e64412a.