Housekeeping

Just some cleaning up of things. Still not sure why the background
surface pointer needs to be declared globally. I might try making the
apply_surface function only a function of window, seeing as it is the
only one doing it now anyway.