Moved to util.
Added dump method. Bug fixed.
Improved user API.