Added subscribe method for adding event listeners with scope.