Additional work for PR #18

Completed the work for PR #18. Apologies for the number of commits here, I didn't want to rebase and mess everything up.
0 means that dead hosts never get cleaned up and I suspect that's not what most users expect.  I'm OK with leaving it as 0, it was just a thought.