Refactor/simplify parsing for a better coverage accuracy.