Then, optional and times implemented. Remove lodash dependence.