Minor performance improvements to /friends/.