GE dishwasher does not clean glasses and other items on top rack properly.

Items on the top rack are not cleaned properly, and glasses are left with a film and spots. When the dishwasher was working properly, there was always some water left over on top of cups on the top rack. That is not the case any more. Also, there is some detergent left over after the cycle is complete.