Cleanup and improve RLE decoding