Fix some fixme issues.
Tidy up definition management registry.