ported linq and tests.
temp commit on the way back to compile.