small code improvements; opts via cli and config file