Fixed some (very bad) bugs in the processing of old format data.
It now seems functional.