Renaming some functions and caching a static int.