Code Cleanup:  Exception error checking, bug fixes