Clean up the process_shells a bit.