Fix/bugs and doc