many changes to loader, deleted use of Record type everywhere