Persist functions across views