Pass context to detach listeners (still needs refactoring)