Add tests and fix problems with cursorForward.