adding tree option

Hi, you can ignore the first two items, as I included a lot of changes and then reverted them and split it into two pieces. The first piece, modularizing, adds a couple of more data points (like the Speed) and sets up a "parse" routine that returns either 0 (matched a line of output) or 1 (failed). This replaced the "continue" function in the original. Also some other changes as noted.

The second piece adds the -t (tree) option.