Refactored
Added Diagramms. Fixed some bugs