AVALANCHE: Review variable scope in Visa2, add some doxygen comments