Make setting of selectedClass to Constructor