Cleanup code.

 - Remove commented code, it is bad practice.
 - Use a C++ indent style
 - Set indent witdth to 2 spaces and no tabs
 - Change some code to improve readability
 - Add more comments to the code
 - Define variables C++ like stlye, in the header and the constructor
Set MAX_USER_DEFINED_HEADER_TYPE for better readibility.
Add copyright