Changed to dict.get(...) in many places