A couple of performance issues solved.