Is there some reason we can't just use:
    PORTB = (leds & 0b00111111); 
Makes sure we don't change non-LED pins on PORTB and it's a bit more succinct than using modulo.