Fixes related()->ref
Changing component factories to protected