Refactor documentation and variable names in cursor and range