server: Extract common utilities as utils