Introduced protocols for delegates

(cherry picked from commit 5acfd8c7e7735f9e438926cca789e50c1c09e84c)