minor improvements to arg parsing