update single and multi select questionType logic

modify structure to take $ionicPopup service as an optional dependency