Changed IFun to Fun
Simplify structure