What kind of car are you driving?
Are you sure the hose/fitting wasn't already damaged or frayed before the issue?
For the idling issue clean the MAF with electrical cleaner and clean your IAC valve with carb cleaner. Check your spark plugs for any water residue. Also Look into the positioning of the MAF Sensor ... should be about 10 O'clock if standing in front of the engine
That maf is about 2 oclock
but with it being an idling issue I'm kinda hesitant on the MAF. Also get your tune checked with the shop you had it performed...