Refactor brain worker into abstract peer, the user does not need to know about this