(Issue #52) Made object identity check for circular reference detection configurable.
Just a little clean up...
(Issue #52) Added some more tests and refactored API