Largely broken, in order to add support for multiple services.