(refactor) increased performance by switching to ng-if on modals