restructured confi and comman line parsing