Create firstclass inner functions