refact configuration module