switching to underscore.js for most functionality