More cache corrections. Sort interface. A few small tests.