Refractor some function names