Perf tweaks and cursor mgmt (need further work)