big progress

Achieved the goal with the dataset I have for testing. Plenty of
un-sucking to do to the script though.