Add Factory pattern samples