improve screensaver.c: move screen cleaning code