Context leak refactor.