Added tests.
Fixed so tests works.