added class heirarchy and comments