Support landskape orientation, code refactoring