Revert "Clean up CursorWindow code."

This reverts commit 3bc6bbc92cd2095f42039b5aadd0a14d0e5d9230.
8 files changed