update structure charts, fix some bugs