remove minimist and stop using argv directly