Are you talking about the filter breaking? If so, that's your problem. By throwing out the old filter and getting a completely new one, you have disposed all of the beneficial bacteria that has taken awhile to form and left the tank to re-cycle itself.
Whenever getting new filters, you MUST ALWAYS keep the same filter media so the bacteria is preserved and nitrAte and ammonia levels don't rise.
Test your water, either by buying a kit or bringing a sample into your local fish store. Even if you are just talking about an air pump breaking, this still sounds like a water quailty issue. I would do a 50 percent water change immediately to perk them up a bit. And, if the levels are high in the tank, you will have to continue to change the water daily until they read "0". Cloudy water also indicates a water quality problem.
And, when water is an issue, the fish tend to get stressed which weakens their immune systems and you run into potential diseases.
Also, be very careful when adding algae eaters and plecos in with fish like goldfish. Most have a nasty habit of attatching themselves to their slime coat and sucking it off when there is no algae to eat in the tank. This usually happens at night when the fish cannot defend themselves. You can prevent this possible problem from happening by dropping algae wafers or tablets into the tank before you go to bed.
One last thing regarding lighting. Fish sometimes get spooked when the lights in their tanks turn on too fast. Their eyes are not as complex as ours and they have trouble adjusting to rapid light changes. It's best to leave a room light on for about ten minutes before putting the light on. It is also better if you keep on a tight schedule. (i.e., turn room lights on at 8:50 in the morning and tank lights on at 9:00 am).
Hope this answered your question.