Improve settings and IoC by constructor