Added initial support for rotation.