Changed all settings to constructor injection