Refactored the code to be simpler and more robust

Based on per peer-review feedback from Rick Waldron (@rwldrn)

Highlights:
- Removed the unnecessary `results` property
- Closed a refactoring hazard due to a missing semicolon