Declare StateToContent with var, not function statement