Added missing require.
Improved error messages. Fixed incorrect value used via attribute changed.
Allow to provide a specific name when registering an definition.