Added tests.
Merge origin/master