add docs of flattening
add some missing API potential functions
change google code link to github