Added tree printing and cleaned up whitespace

Adjusted the toString method to support printing trees as well as graphs
(the first instance of a variable is printed, all others are then
ignored).

Also removed trailing whitespace characters.
Merge branch 'master' of github.com:jkkummerfeld/berkeley-amr

Not really necessary - I did a pull rather than rebasing
Adding tree printing to my main