Implemented more handling for duration, with predefined values.
Implemented partial support for orientation change.