made documentation for the program

still not finished because of lack of comments in several files