Added WindowToViewport class, small mods