Added comments and class diagram