Made some changes as I worked through the source to learn it.
I also added in a way to output the screen to a screencap for use with another program I'm writing