WIP. Working on shutting down cleanly.