Revert "Initialize in struct"

This reverts commit 168b6996fa53729a0a39e8985b67956b4c3a365a.

Apparently some compilers can't handle initialization to a function
defined in another module.
Clean up metadata object creation