Refactor config into its own service