Refactor whole init config