Switched to jshint.

Added window, document and undefined to the function declaration.
Added support for additive inverse operations.

Added tests.