Smart grids provide an excellent opportunity to improve the performance and the power quality of distribution system. This paper addresses a simple and effective approach to improve the quality of electric power in smart grids with high penetration of smart appliances such as plug-in electric vehicles (PEV). Assuming a typical daily load curve, decupled harmonic load flow (DHLF) formulation is used to model the distorted grid, identify the worst bus and calculate the total harmonic distortion (THD) over a period of 24 hours. The possibility of reducing THD (e.g., to 5%, as recommended by IEEE-519) by optimal dispatch of LTC and shunt capacitors is first investigated. Otherwise, for systems with high penetration of smart appliances, passive filter banks are placed at the worst buses and the switching devices are rescheduled to improve the overall quality of electric power. This approach is demonstrated for the IEEE 30-bus 23 kV distribution system and case studies are presented to demonstrate its effectiveness.