refactored parsing of s19 files, not happy with it yet, but its a step in the right direction