finished commenting all main classes + minor refinements