Extract code to register service for the version