Move the main service into its own class

This removes the logic from the main runner, leaving that to just
set things up from the config files.

Change-Id: If389a57d049069b769495e7dc3b940a3a145d845