Split init_server into smaller units