Added additional comments, and cleanup.
Will submit pull request to get feedback for improvements needed.