Cleanup product and variant factories

Fixes #2419