Added an config factory class.