Added some setting to the Label Dialog and add the OutputDialog. Make some changes to the code order.