Gui 554

improved error handling. wrapped some things in try/except, call common functions for error handling/parsing