Split off class for extracting relevant parts from PsiElements.