Simplify handling of optional arguments