JSHint: add config
ec: use x1/x2, y1/y2 variables

No logic change, just using the variables that are defined instead of
repeating code.
JSHint: remove defined but never used
JSHint: add max line length 120
ec: white space fixes

It is advised to use ?w=0 in comparing this commit.
ec: remove semi-colons
ec: compare strictly against null
ec: define on use
Merge pull request #205 from dcousens/jshint

JSHint and fixes