Simplify protocol code