Fix function names and prototypes according to convention.