Tidied up some code

Streamlined imports, privatized some iVars, and simplified window size
setup.