Improve tree drawing; add a command system which processes Caml's output