Updates toDictionary to include a value selector in addition to its key selector.
Introduces memoize, because everybody needs to memoize.
Adds more functions to the callXMLProperty function.