Fixing old peer manager.
Setting ip address in local peer.
Refactor (removed getKey from LocalPeer).
Refactor for better handling of local peer detection.