Improvements to c compilation