Added functions to Enumerable invert and flatMap/map. Added tests.