Move alias handling into the client