Refactored code to clear out unnecessary try/catch and reduce nesting. Fixed landscape mode.