Minor improvements and fixes.

* Added tests.
* Fixed logger message, when objects can't be stringify.
Removed unnecessary code.
Merge pull request #3 from beregond/tests

Minor improvements and fixes.