Optimization Methods For Distribution Systems: Market Design And Resiliency Enhancement