When it was food, was it dry food or wet food? In both cases, it's most likely caused by eating too much too fast, usually without chewing properly because cats are the kind of an animal that can't really chew. You'd want to make sure you only give them a little bit of food at a time. Dry food also tends to swell in their stomach so that's one thing that causes throwing up. But if he's currently only throwing up liquid, it's because his stomach is empty. Cats are small animals and carnivores, they process food fast. They need to eat often.
Food-related pukings related to my cat, I've had both of those happen. To avoid the first because he just vaccuums food up without chewing is to either give him smaller pieces or a large chunk of meat he can't stuff down his throat without ripping it apart first, or just smaller portions if feeding cat food from a can. If he wakes up before me because he's hungry, he could throw up nothing, so I've made sure that there's always a little bit of food for him overnight in case he needs to eat.
And of course, it could still be a food allergy that causes both of the symptoms. When you were trying new foods (you shouldn't switch them out too fast because cat stomachs can be sensitive to change), did you actually take a look at what the food was made of? Grain and fish are pretty big cat food allergies, you'd want to find food without those and try them out. Trying to narrow down food allergies is pretty much removing everything and then slowly adding in more stuff until you get the symptoms again.
And if it was an allergic reaction to the bites, even if the fleas are gone (though they might not be as they are really difficult to get rid of the entire environment and I'm not sure if you guys are willing to spend money and time to get your entire house and yard flea-free) then the cat will probably still keep itching the itchy places so they never have time to heal. But you know. Only a vet knows for sure. Could be something worse.