Improve performance.

We've made a few performance tweaks here. We've also refactored the groups dropdown to be about 100x faster than it was before.