Added default value for named parameters, checks for parameter values, reporting for errors and fixed segmentation fault when object creation fails