Fixed Exceptions, refactored IOHandler