Optimize configure class initializing logic