Refactoring, added enum Orientation
Block rotation calculated