added exception hook handling and switched to relative local imports. This closes #1.