Added documentation to the code, run doxygen to get it.