Track cursor pos (source of slowdown), other fixes