Remove unnecessary .keys() of dict