do not expect to be in namespace std

This code seems to expect that we are in namespace std, which is a bad
practice.
try to factorize uneeded factories

Copy/pasted factories call is useles and make the code really hard to
read.

This patch aims to remove those factories call