Adding some debug print statments (sigh). Making display window get correct dimensions.