Minor tweaks to the JavaScript library

- Don't destroy the engine's state on successful guess
- Remove the now unused finish() method
- Set variables to an initial state of 0 instead of null