More code cleanup (settings init + validation) and few optimizations (cache few settings ...)