rename and define some local var/funcs static