Refactored for older browsers

Adjusted code so that older browsers that do not implement web workers
will directly load and run the algorithm code.

Also slightly improved UI.