Refactoring using lodash.