Moved some of the logic for choosing parent generator or child generator