Remaining bugs fixed in inmem. Passes all but one test