Extract peer connection process.
Reorganize imports.
Add lots of TODOs.