Cleanup

Also moved packet, and started on a better graceful shutdown.