Remove useless include.
Refactor peer operations.

peer.c now hold all variables and functions to handle peers. This makes
it way easier to maintain and to unit test.