Moved all the cursors functionality to the separate class.