Improved test bench and added slf4j. Fixed a bug in canonical ordering