Move configuration parsing into its own module.