Made the orientation configurable.