[WIP][issue #369] UML added, and code cleaned