Refactoring for iPad support