First working version with preferences dialog