Fixes #32 (closed).
While at it I added an argument output_level to be able to debug the whole thing easily.
output_level