Fix longjmp() handling; refactor; add comments