- Added logic and comments.
- Updated version.