Change to new factory handling.
Code cleanup.