Rename StateFunction to StateFunc.