Integrated Minh's part
misc fix & UML diagramms
added margin notes