Fix some perf issues
Final touches