Refact config