sort aliases and remove useless stuff