Sorry about your fishkeeping troubles.
Is it possible that one or more fish have died and are trapped among rocks or ornaments? Could something else have died, like a large snail? Could there be a large amount of uneaten food in the tank, trapped out of reach of the fish?
Is the filter working and not clogged or broken?
If you now have less fish than before and the ammonia and nitrites are still high, it is unlikely to be overstocking. I think the source of ammonia and nitrites is something in the tank.