Refactoring, added enum Orientation