Replaced delete with add/remove based methods with = undefined for GC memory optimization