Move width and height into function.

Now the screen resolution can be changed when directly when the
main-loop function is called to experiment with different resolutions
more quickly.