Added automatically detecting default values for the optional arguments