Created factory method for the fragment.