New smart_display() version based on AS receipes:
http://code.activestate.com/recipes/267662-table-indentation/ and
adapted to our own needs.