Refactoring implementation to use Underscore/Lo-dash utility methods.