Refactor arg parser