Merge pull request #325 from giorgio130/master

Nicer close button, solves #321.
Refactored to use strictly locals
export highlights only if highlighted text is not nil
Merge pull request #329 from chrox/master

export highlights only if highlighted text is not nil
check json output before decoding
This should fix #332.
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
Merge pull request #1 from chrox/master

fix several local calls of Math.round
add missing gettext and Menu module
Merge pull request #334 from hwhw/master

Refactoring: Make globals local
Merge pull request #2 from chrox/master

add missing gettext and Menu module
Merge pull request #335 from chrox/master

add missing gettext and Menu module
Merge remote-tracking branch 'upstream/master'
add missing require for defining DEBUG
Merge pull request #337 from hwhw/master

add missing require for defining DEBUG in ConfigDialog
missing require() of infomessage in UIManager

require() must be done locally in order to not create circular dependencies