removed BufferedWriter from being passed as a parameter to all the visit and accept methods. Instead it is a field of each visitor class