Add proper command line options.

Added proper command line options, also added threshold option and post
delay option.