Refactoring to support parsing SAM type records from the "global api".