Fix bugs
Preferences in center of the main window
Add settings