Some function flattening