Updating function name.
Reorganizing some functions.