Rename and some rewrite