Refactored services and endpoints

They are now part of the configuration, rather than records in a
database.