Adapt to vertical displays.
Misc changes