feat(factory): remove empty nodes