Added validation and initial selection.