Copied a probably better external wig parser. To be tested. Tests pass at least.