Making an ast re-writer