some cleanup of c source