Changed modify() api

Changed modify() so that it either takes a set of keyPaths and values,
OR a function taking the object to do whatever modifications required.
Cleanup...