Refactor registration of scoped objects

Signed-off-by: Jerome Doby <XaeroDegreaz@gmail.com>