Contextual menu and refactoring