refactoring ParseBinaryStructure (not yet finished)