Commutator calculus and link invariants