Adding Doxygen-Style Documentation To Source Code

Pull Request of documentation changes and a few source code changes.