Details

- Added notes for clarity.
- Refined the code a bit.
- Updated README