Added class diagram (uml).
Code Refactoring.