Changed Tree class and the main function based on the latest changes of pretty_extras library.