Learning var passing and event linking