Stubbed Sync port back to javascript
Removed foreach.js, xtend, replaced with underscore