WIP Refactor js
Add test data
Fix jshint warnings