Made auto scaling to window size.  Fixed a lot of associated bugs.