basic config and command line option handling