Refactors config to its own module