Fix command-line parsing and handling options. Remove command-line option "--restart" for now as it cause more trouble than it is helpful. BTW option should be called "--replace" ;)