- removed too many comments
- replaced inline comments with multi-line comments
- used dictionary comprehension