Move configuration into its own struct