simplify dict loops

* use `.values()` instead of `.items()` when not using the keys
* use `.keys()` directly instead of rebuilding lists from it