all lodash/underscore functions converted to local variable references (better minification, easy swap of implementation)