1. put command line flags into a struct.  2. logging related cleanup
clean up logging to reduce noise
random delay flag