Added some comments. Fixed a missing declaration in hw4.cpp