finish forest de/serialization
change CMakeLists.txt to separate library and executable file
organize main, now it fully support command line control