Modifications after testing on RPi