Get rid of global variables

Can’t init callbacks because of strict mode
Set up callbacks before calling changeOptions function
fixed a typo
small fixes
Merge pull request #9 from bardsoftware/latex_spellchecking

Get rid of global variables