Refactor the code

Refactor the codes and add some method demo to TreemapExample