Code refactoring, added Settings class