Refactored Database iterators so dicts can be modified while
iterating