Some small perf tweaks