Added to QUnit tests.

As well as made some minor changes.
Merge remote-tracking branch 'refs/remotes/origin/master'