Few micro optimalizations

(possibly premature)