Refactored Cursor API

Previous version of Cursor API relied on visitor pattern, which turned out to be unnecessary complexity. Removed the visitor pattern, and replaced with getter on the cursor, which is much easier to use, and can be easily combined with visitor pattern by client code.