Rewrote argument parsing