More refactoring, bug fixes

I know that resuming a job whose engine has been killed isn't working
but I think the variant calling starting from the beginning is working.