Extracted class RefactoringContext. Changed all the refactoring rules to use it and removed redundant instance members.