Performance tweaks to scaler