The total variable was used in main3.js to sum all of the various elements that were to be paid for during registration.
The finalValue variable was used in main3.js to provide a text string:
fname + ” ” + lname + “|’ + total
which was used in the PayPal Pro premium plugin.
functions.php was only used to enqueue the css and js files.