Allow --fusion-mode to be set.

Also refactor to remove some of the bad logic and old code that
had accumulated.
Use do.run properly.
Add fusion_mode as an allowable 'algorithm' field.