This paper presents the Xrefactory project. Xrefactory is a plugin to editors and Integrated Development Environments (IDE) providing a variety of source understanding and refactoring functions. It helps developers in performing both hand made and automatic refactorings. The paper presents briefly external functionalities of the tool and discusses more specifically the internal architecture and overall design decisions made during its development. 1