Implement Cursor class