Refactor multiple compoenents so they can pass configurations around