Some small perf tweaks.