Add conf.sample, fix main, move opts for main