ipc: remodeling code structure, now uses pids.