Refactored, removed lodash dep