A lot of improvements.

Now it displays the expected result, in a reasonable time.