added some comments, updated class diagram