hwscroll fix cursor fix code cleanup