moved some stuff around into the header file
clear peers from the reading set after shutting them down