Javascript Choose-your-own-Adventure Engine