switch to 2 phase mark and recompute to ensure consistency of computes

If two computes used by a 3rd compute change their value at the same time, the 3rd compute should only recompute and change once. It should never return an inconsistent value.
replace lodash functions to reduce file size