Refactored to move most of the work to scan and recover dead tests out of the servers. This commit also fixes dependencies in the Makefile.