Preference window fix

Now, one can save preferences. I also improved the import help after solving my dependency issue.