Switch to using lodash.

Refactor a lot of code with awesome lodash stuff.