- Added comments.
- Renamed functions to make more sense.