More shutdown code, better testing, and I'm passing the buffered reader
around