Rename and edited some function.