Remove lodash dependency

This reverts commit 605df725b7a156573ef6b60454298e45b1011da0.