I would put the code back to how it was and just use the built in settings to remove the Update Button from each line and just have the one below the items in the Configuration ... Stock Settings ...
Show Shopping Cart - Update Cart Button Location
Show on Shopping Cart Update Cart Button Location as:

1= Next to each Qty Box
2= Below all Products
3= Both Next to each Qty Box and Below all Products