Extract arg parsing to object