refactor(peer_server): move stats construction to factories