Fix categories jobs association. Reworked the factories.

Also reworked the factories