lots of messing with exception handling
cleaned up exception handling
updated