Refactor handleDoctests; add tests for the column offset.