[events protocols delegates] fix error in sample, get rid of old code