Code cleanup.
Added some comments/Documentations.