handle quotes on renaming, improve name validation