[WIP] Solve cyclic references

I agree, but a depth 5 output could potentially flood the log, reducing the value when using it. Especially printing arrays will take up a lot.

We could implement a recursive function for printing, with the last level do as proposed now. Then it would be easy to experiment with how deep we want it to go.