Added NaN dependency and update test mask for *.js
Added test data
Big refactoring of the module due to integration of NaN.