Clean up IPC code