Added logic to skip over irrelevant open/close bracket pairs
Converted all appropriate `dict[key]` instances to `dict.get(key)`.