Correct inaccuracies in code comments
Refactor patch_headers with try/except/finally to ensure and ending message is generated for each header

Also update existing tests to pass with new structure. Closes #116