added copyright headers. 
added comments to some source codes for Doxygen.