Fix rotation with viewport, better night mode with viewport

This fixes rotation with a viewport. It also implements bezel cleaning with black in night mode.