refactor config module into own file