Convert analysis to new-style calling
Use argv instead of argn and args
Remove unused parameters from static functions