move some parameter parsing into params.c