Added records and top-level function definitions.