uml diagram and minor fixes