Reduce size of library from 100kb to 20kb

We should not use lodash in it's current form. It's far too
heavy and unneeded.

cc @chenglou @crm416