Fixing bugs in the Preferences code and putting it into the example.
Project settings update