Tentative of record fix; also some warning cleanup