QEncoder code cleaning