Added header file for waitpid. Fixed syntax errors