Address feedback from @mithriltabby

- Add documentation to classes and functions
- Add comments to convey intentions (mithriltabby)
- Clean up repetitive strings using a map (mithriltabby)