Refactored tablet application to incorporate orientation changes