Added source files in separate folders, updated files to close and unlink pipes