Settings class and tests