Refactored to use strictly locals
Merge pull request #329 from chrox/master

export highlights only if highlighted text is not nil
Further refactoring

This should finish the work to make all globals to local variables.
That allows LuaJIT to properly compile things by interning the
references to the relevant parts (rather than looking up globals
all the time which stops a trace).
Merge remote-tracking branch 'upstream/master'

resolved conflicts with refactored structure
Merge pull request #333 from chrox/master

check json output before decoding
Make DEBUG a require()d local
Merge remote-tracking branch 'upstream/master'
fix several local calls of Math.round