modified to add a relative prefix of current directory
removed code that deletes all rows in application and hosts replication DB.

The deletion is for the previous algorithm. Since the partial request
of applications and hosts were implemented, they are no longer needed.
cleaned up updateHosts() with a helper method.