[TASK] Optimize exception handling

Did code cleanups and optimized passing of exceptions. Furthermore
displaying of exception messages was optimized and strange return
statements eliminated.