Viewport changes and a few other fixes