Cleaner, more readable error handling code (and more error handling) in GUI