Rewrote the code and elimited the comments.