Drop incorrect local variable name.
Drops unused function
Parsing of ranges: N,N-,N-M,-M
Refactor range parsing; change missing indicator to 0 (rather than -1)
Collect fields according to ranges.
Fix duplication issue.