Rewrote command-line parser in git-style.