Fix curses cleanup and improve autosolve rendering