Add reference counting to ELE pattern.