Flatten more external functions