Fixed discover resources
Added leader to replica as an object and capture its messages
Fixed Tests