Improved pimple factories adding namespaces (to avoid services of different types to cause conflicts)