Preferences

Organizing the preference screen.
Also fix of #209.