Extraction of authorities and refactoring