double buffered for smoother frames + cleanups.