Another attempt to lower complexity (pico_protocol.c)