Rename stop button to kill button. It will cancel the process

Also refactor the code trying the get rid of the race conditions, which
are producing duplicates entry in the table. But it doesn't work, need
further investigations