Updated settings code