Minor perf improvements