Continuing work on API redesign. Added last n entries code. Yet to test.