Bug fixes, Add more documentation, doxygen support

* Fixed several naming and code inconsistencies
* Removed unneeded code and comments
* Added doxygen config file to support doxygen
* Added a ton of comments in doxygen format
Added doc directory for doxygen
Revert "Added doc directory for doxygen"

This reverts commit 231f5237605a647c7ffe11d11d6a70315ea9a1e7.