internal refactorings