removed useless parts of protocol code