Added support for timing out and removing stale services.