IS militants have turned the city into a labyrinth of home-made bombs and booby-trapped buildings, and are using snipers to halt Iraqi progress.