More locking and NotFoundException handling
Merge remote-tracking branch 'origin/master'
Refactored Cursor API
Merge pull request #2673 from rickardoberg/cursorrefactoring

Refactored Cursor API