Add function prototypes and return types where lacking.