Refactor justification parser