Redoing the deletions that Hannes had done to the original cursor.c