Remove old RCS keywords
Remove unused variables
Fix a mismatched function signature
Add sys/types.h for pid_t
Use C99