Remove unused functions
Remove unused list with malloc
Removed unused semaphores and pipes