Refined RLE and basic Qube implementation