Update arg parsing to be more robust.