Finally handling both portrait and landscape