Refactoring settings subsystem