Split server functionality out into a trait.