Implemented portrait and landscape modes