#9 added pref window and wired outlets and actions