Separed simulation logic from protocol logic splitting the run() method into an actual run() method containing the simulation logic and a protocol() abstract method containing the protocol logic.