cleanup. Preparing for SDL.