minor tweaks
fixing some perf regressions
formatting