remove commented code
add trajectory printout with EBUG0 condition
remove commented out code
correct local variable namae to be unique within the functions