Refactor to remove parser, use parseDigit directly