Retitling and atom tidying