Fixing memory leaks

- Terminating web workers so they can be garbage collected