Remove inner functions