Added preferences and confirmation dialog