Fix Issue #179 Unnecessary duplication in modals.js