Firmware optimization

shape