cleans up stretchsprite code. more modular, uses mainloop.