Fix jsHint errors
Make swap test faster
Merge pull request #1240 from andrerod/dev

Fix jsHint errors