More work on the C implementation