Refine RPi implementation