use lodash/underscore to refactor createPopup
linting