Minor code optimalizations.