Remove assignment to True/False and use of dict.has_key() to silence warnings