lodash is drop-in replacement for underscore.  Since the dep is on
underscore rather than lodash, updated module name appropriately.
Additional refactoring for modularization.