Added some functionality to 'tools' module. Fixed bugs.
Added Comparison and ordering in documentation (not complete).