More refactoring, bug fixes

I've fixed many bugs and played with the html. I am going to test now. I
know there are still problems with restarting a job whose engine was
stopped and deleted.