Merge server capability refactoring from Dave.