Implemented portrait and landscape modes and added event handlers
Merge remote-tracking branch 'origin/master'