various fixes and tidying
correcting import parts for cursors