A few minor tweks to return values from certan functions to ensure that they always return a valid value - a dictionary