Working on the new factory pattern