Much cleaner settings code.