More clean up of main code, abstracting frame stuff.
More clean up of main code, abstracting frame stuff.

Using the newly created function to setup the frame. Works fine.

mearns/raytrace,mearns/raytrace,mearns/raytrace