Cleanup, Comments, Known Issues

Some cleanup of the code. Added some comments. Added Known issues
section.
Added Notes section in comments.