Tidy up experimental code

My last commit included some experimental code to deal with cursor
problems; should not have been included.