Refined testing, output of logging id more useful than before. Implementation is nicer.