Again removes some indirections and extra arguments. Also replace some memcpy/memmoves with assignments. (Assignments became possible only later, when reference UIDs were turned into a struct.)