Replaced Registry by Factory