Improve and spec Function pretty-printing.
Autorename entities with conflicting names.