Referential data types may need to be declared.

And other small fixes.