Refactors aliases.